package com.sskj.gcc.ui.activity;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.gcc.bean.GuideListBean;
import com.sskj.gcc.http.HttpConfig;
import com.sskj.gcc.presenter.BasePresenter;
import com.sskj.lib.http.JsonCallBack;


/**
 * @author Hey
 * Create at  2019/07/16 17:36:07
 */
class NoticeDetailPresenter extends BasePresenter<NoticeDetailActivity> {
    public void getNoticeDetail(String id) {
        httpService.getGonggaoInfo(id)
                .execute(new JsonCallBack<HttpData<GuideListBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<GuideListBean>> response) {
                        HttpData<GuideListBean> httpData = response.body();
                        if (httpData.getCode() == HttpConfig.OK) {
                            mView.setData(httpData.getData());
                        }
                    }
                });
    }
}
